package top.zy.service.upload.service;

import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import top.zy.common.zymallcommon.utils.exception.ZymalException;
import top.zy.service.upload.util.AliyunUploadDown;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 16:23 2019/6/23
 */
@Service
public class UploadServiceImpl implements UploadService {
    @Override
    public String uploadImage(MultipartFile file) {
        try {
            return AliyunUploadDown.picOSS(file);
        } catch (Exception e) {
          throw new ZymalException("上传失败");
        }
    }
}
